package com.ddwl.message.dao;

import com.ddwl.common.dao.TkDao;
import com.ddwl.message.mapper.MessageInfoMapper;
import com.ddwl.message.model.MessageInfo;
import org.springframework.stereotype.Repository;
import tk.mybatis.mapper.entity.Example;

import javax.annotation.Resource;
import java.util.List;
import java.util.Map;

@Repository
public class MessageInfoDao extends TkDao<MessageInfoMapper, MessageInfo>{

    @Resource
    private MessageInfoMapper messageInfoMapper;

    public List<MessageInfo> getAll() {
        Example example = new Example(MessageInfo.class);
        return messageInfoMapper.selectByExample(example);
    }

    public void changeId(Map<String, String> map) {
        messageInfoMapper.changeId(map);
    }
}